﻿using System;
using BusinessLogic;
using BusinessLogic.Model;
using Mvp;

namespace WebControls
{
    public partial class CommentInfo : System.Web.UI.UserControl
    {
        public Comment Comment { get; set; }
        public int PageNumber { get; set; }

        protected void Page_Load(object sender, EventArgs e)
        {
            hlComment.NavigateUrl = UrlUtilities.GenerateCommentUrl(Comment, PageNumber);

            ltTitle.Text = Comment.NewsItem.Title;
            ltDate.Text = Comment.PostDate.ToTimeAdjustedString();
            ltAuthor.Text = Comment.AuthorUsername;
        }
    }
}